package com.example.traning.spring.ioc.aop.service;

import org.springframework.stereotype.Service;

import java.util.Objects;

/**
 * Component 子注解：@Repository，@Controller，@Service
 *
 * @author lei yu
 * @since 2024/09/23
 */
@Service
public class RoleServiceImpl implements RoleService {

    @Override
    public String test(String string) {
        System.out.println("原有方法执行了！！！");
        if (Objects.isNull(string)) {
            throw new RuntimeException();
        }
        return "hello";
    }
}
